package com.huike.web.controller.system;

import com.huike.clues.domain.vo.CustomerVo;
import com.huike.clues.service.ReportService;
import com.huike.common.core.controller.BaseController;
import com.huike.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/report")
public class ReportController extends BaseController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/customer/list")
    public TableDataInfo customerlist(Integer pageNum,
                                      Integer pageSize,
                                      String coursesSubject,
                                      String courseName,
                                      String activityChannel,
                                      String businessOwner){
        System.out.println(activityChannel);
        List<CustomerVo> list =reportService.findCustomerList(pageNum,pageSize,coursesSubject,courseName,activityChannel,businessOwner);

        startPage();
        return getDataTable(list);
    }

    @GetMapping("/channel/list")
    public String channellist(){
        return "channellist";
    }

    @GetMapping("/sale/list")
    public String salelist(){
        return "salelist";
    }
}
